package ${domain}.frame.mail.message;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

/**
 * 发送带附件的邮件
 * <p>
 * WFileMessage message = new WFileMessage();
 * message.setSubject("标题");
 * message.setContent("内容");
 * message.addFile(new File("E:\\1.jpg"));
 * WMailSender.send(message);
 *
 * @author wangbing
 * @version 0.0.1
 * @since 2020-08-01
 */
public class WFileMessage extends WHtmlMessage {

    private List<File> files;

    public List<File> getFiles() {
        return files;
    }

    public void setFiles(List<File> files) {
        this.files = files;
    }

    public void addFile(File file) {
        if (files == null) files = new ArrayList<>();
        files.add(file);
    }
}
